package com.senken.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.senken.mapper.ReturnChildMapper;
import com.senken.entity.ReturnChild;
import com.senken.service.IReturnChildService;
import com.baomidou.framework.service.impl.SuperServiceImpl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;

/**
 *
 * ReturnChild 表数据服务层接口实现类
 *
 */
@Service
public class ReturnChildServiceImpl extends SuperServiceImpl<ReturnChildMapper, ReturnChild> implements IReturnChildService {


	@Override
	public List<ReturnChild> selectChild(int hid){
		ReturnChild returnChild = new ReturnChild();
		returnChild.setHid(hid);
		return this.selectList(new EntityWrapper<ReturnChild>(returnChild));
	}
	
	@Override
	public boolean addReturnChild(int ordernum,String devicecode,int num,String sales,String reason,int hid){
		ReturnChild returnChild = new ReturnChild();
		returnChild.setDevicecode(devicecode);
		returnChild.setHid(hid);
		returnChild.setNum(num);
		returnChild.setOrdernum(ordernum);
		returnChild.setReason(reason);
		returnChild.setSales(sales);
		return this.insert(returnChild);
	}
}